package vn.elca.training.important_classes_excercise;

import java.util.HashMap;
import java.util.Map.Entry;

public class Question4 {

	public static void main(String[] args) {
		HashMap<String, Integer> carPrices = new HashMap<String, Integer>();
		StringBuilder priceOfAllCar= new StringBuilder();
		carPrices.put("BMW", 70000);
		carPrices.put("Kia-Forte", 29000);
		carPrices.put("Toyota-Camry", 60000);
		carPrices.put("Lexus", 90000);
		carPrices.put("Honda-Civic", 31000);
		carPrices.put("Audi", 90000);
		System.out.println(carPrices);
		for( Entry<String, Integer> e : carPrices.entrySet())// for-each loop.
		{
			priceOfAllCar.append("["+e.getKey()+"("+e.getValue()+")"+"]");
		}
		System.out.println(priceOfAllCar.toString());
	}

}
